package com.jason.session;

import com.jason.config.Configuration;

public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(this.configuration);
    }

    @Override
    public SqlSession openSession(boolean autoCommit) {
        return new DefaultSqlSession(this.configuration, autoCommit);
    }
}
